package com.chixing.mapper;

import com.chixing.entity.Customer;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.time.LocalDate;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author shy
 * @since 2022-10-20
 */
@Mapper
public interface CustomerMapper extends BaseMapper<Customer> {
    //根据id修改user
    @Update("update customer set cust_name=#{cust.custName},cust_telno =#{cust.custTelno},cust_email=#{cust.custEmail},cust_certificates =#{cust.custCertificates},cust_certificates_number=#{cust.custCertificatesNumber},cust_birthday =#{cust.custBirthday},cust_driver_license=#{cust.custDriverLicense} WHERE cust_id = #{custId} ")
    Integer updateCust(@Param("custId") Integer custId, @Param("cust") Customer customer);

}
